<?php
namespace LC\EntityBundle\Entity;


use Doctrine\ORM\Mapping as ORM;



/**
 * @ORM\Entity
 * @ORM\Table(name="Bike")
 *
 * @author Ralf Almon 21.06.2013
 */
class Bike {
	
	/**
	 * @ORM\Id
	 * @ORM\Column(type="integer")
	 * @ORM\GeneratedValue(strategy="AUTO")
	 */
	protected $id;
	
	/**
	 * @ORM\Column(type="string",length=100)
	 */
	protected $manufacturer;
	
	/**
	 * @ORM\Column(type="string",length=100)
	 */
	protected $model;
	
	/**
	 * @ORM\Column(type="decimal")
	 */
	protected $modelyear;
	/**
	 * @ORM\Column(type="date")
	 */
	protected $end;
	/**
	 * @ORM\Column(type="date")
	 */
	protected $start;
	
	//tbi
	protected $picture;
	
	/**
	 * @ORM\ManyToOne(targetEntity="Biker", inversedBy="bikes")
	 * @ORM\JoinColumn(name="bikernick", referencedColumnName="nick");
	 */
	protected $owner;
	
	
	
	
	/**
	 * -------------------------------Getters and Setters - Boring ------------------------------------
	 */

	
	
    /**
     * Set manufacturer
     *
     * @param string $manufacturer
     * @return Bike
     */
    public function setManufacturer($manufacturer)
    {
        $this->manufacturer = $manufacturer;
    
        return $this;
    }

    /**
     * Get manufacturer
     *
     * @return string 
     */
    public function getManufacturer()
    {
        return $this->manufacturer;
    }

    /**
     * Set model
     *
     * @param string $model
     * @return Bike
     */
    public function setModel($model)
    {
        $this->model = $model;
    
        return $this;
    }

    /**
     * Get model
     *
     * @return string 
     */
    public function getModel()
    {
        return $this->model;
    }

    /**
     * Set modelyear
     *
     * @param float $modelyear
     * @return Bike
     */
    public function setModelyear($modelyear)
    {
        $this->modelyear = $modelyear;
    
        return $this;
    }

    /**
     * Get modelyear
     *
     * @return float 
     */
    public function getModelyear()
    {
        return $this->modelyear;
    }

    /**
     * Set end
     *
     * @param \DateTime $end
     * @return Bike
     */
    public function setEnd($end)
    {
        $this->end = $end;
    
        return $this;
    }

    /**
     * Get end
     *
     * @return \DateTime 
     */
    public function getEnd()
    {
        return $this->end;
    }

    /**
     * Set start
     *
     * @param \DateTime $start
     * @return Bike
     */
    public function setStart($start)
    {
        $this->start = $start;
    
        return $this;
    }

    /**
     * Get start
     *
     * @return \DateTime 
     */
    public function getStart()
    {
        return $this->start;
    }

    /**
     * Set owner
     *
     * @param \LC\EntityBundle\Entity\Biker $owner
     * @return Bike
     */
    public function setOwner(\LC\EntityBundle\Entity\Biker $owner = null)
    {
        $this->owner = $owner;
    
        return $this;
    }

    /**
     * Get owner
     *
     * @return \LC\EntityBundle\Entity\Biker 
     */
    public function getOwner()
    {
        return $this->owner;
    }
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->owner = new \Doctrine\Common\Collections\ArrayCollection();
    }
    
    /**
     * Add owner
     *
     * @param \LC\EntityBundle\Entity\Biker $owner
     * @return Bike
     */
    public function addOwner(\LC\EntityBundle\Entity\Biker $owner)
    {
        $this->owner[] = $owner;
    
        return $this;
    }

    /**
     * Remove owner
     *
     * @param \LC\EntityBundle\Entity\Biker $owner
     */
    public function removeOwner(\LC\EntityBundle\Entity\Biker $owner)
    {
        $this->owner->removeElement($owner);
    }

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }
}